﻿using BLL.Dal;
using BLL.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class SysAdmin_Power_Edit : System.Web.UI.Page
{
    public string power_key;
    public string power_name;
    public string power_iconName;
    public bool power_isActive = true;
    public string menu_code;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bindData();
        }
    }

    /// <summary>
    /// 初始化数据绑定
    /// </summary>
    void bindData()
    {
        if (Request["power_key"] != null)
        {
            MenuPowerDAL powerBus = new MenuPowerDAL();
            MenuPower model = powerBus.GetModel(Request["power_key"]);
            if (model != null)
            {
                power_key = model.powerCode;
                power_name = model.powerName;
                power_iconName = model.iconName;
                power_isActive = model.isActive;
                menu_code = model.menuCode;
            }
        }
    }
}